package com.my.study.designPatterns.factoryPattern;


/**
 * 工厂类
 */
public abstract class PizzaFactory {


    public Pizza orderPizza(Integer type){

        Pizza pizza = createPizza(type);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }


    public abstract Pizza createPizza(Integer type);

}
